package thinking.java.initalization.and.clean.up.example;

/**
 * @author GaoFeng
 * @date 2019/12/31 20:39
 */
public class Ex_5_3_6_OverrideConstructClass2 {


    public static void main(String[] args) {
        Ex_5_3_6_OverrideConstructClass2 overrideConstructClass2 = new Ex_5_3_6_OverrideConstructClass2();
        overrideConstructClass2.print(1, "Hello");
        overrideConstructClass2.print("Hello ", 1);

        // 两个方法重载

    }

    public Ex_5_3_6_OverrideConstructClass2() {

    }

    public void print(String message, int num) {
        System.out.println("message is " + message + ", num is " + num);
    }

    public void print(int num, String message) {
        System.out.println("num is " + num + "message is " + message);
    }

}
